The present invention relates to an image decoder and more particularly, to a method of removing a block effect and ring effect which appear in a compression-coded image of an image decoder. The present invention is especially applicable to reduce the block and ring effects appearing in an image coded at a very low bit rate.
To encode either a still or motion image using a process based upon a discrete cosine transform (DCT), the image is divided into a plurality of segments. Typically, the image is divided into 8xc3x978 segment blocks and the DCT operation is executed for each block. However, an inter-block correction information cannot be obtained by such a block-based DCT operation, thereby causing a visual discontinuity effect, known as the block effect, to appear at boundaries between adjacent blocks.
Generally, when the DCT operation is performed on an original image, most of the significant information would be concentrated within the lower-frequency components rather than the higher-frequency components. Thus, the low-frequency components of the block-based DCT process would include a large amount of correlation information regarding adjacent blocks. However, the block-based DCT process lacks the inter-block correlation information. As a result, if the low-frequency components are quantized on a block-by-block basis, a continuity is lost between adjacent blocks, resulting in the block effect in a reconstructed image.
Also, by quantizing the coefficients obtained from the DCT process, the number of bits is reduced. Namely, as the interval of the quantization step xe2x80x98qxe2x80x99 increases, the number of components to be coded reduces, resulting in a reduction in the number of bits. At the same time, however, the high-frequency components of the original image is lost, causing a distortion called the ring effect in the reconstructed image. The ring effect increases with the quantization step interval and is especially apparent in object contours of the reconstructed image.
The cause of the block effect and the ring effect may generally be deemed as a loss of information in the original image. Moreover, with a lower bit rate, the loss of information is more sever and, the block effect and/or ring effect becomes more significant.
One simple method to reduce the block effect and/or the ring effect is a low pass filtering (LPF). For example, an averaging operation or a digital signal process which substantially has the effect of a LPF may be used to remove the block effect or ring effect.
One LPF technique is based on the averaging operation, including a filtering masking by which nine pixels are selected. Basically, a given pixel and eight pixels surrounding the given pixel are selected as the nine (3xc3x973) pixels. Thereafter, the nine pixels are summed and divided by nine to obtain the average pixel value. However, this LPF technique is disadvantageous because it further filters object contours which are important factors for image recognition. Other LPF techniques are variants on the application of the filtering masking in consideration of the form and pixels selected.
Another method to reduce the block effect and/or the ring effect is an adaptive LPF in which an image is partitioned into blocks according to the directions of the image contours. A filter suitable to the contour directions of the partitioned blocks is then employed. The adaptive LPF can be applied to a local image characteristic by partitioning a reconstructed image into blocks according to the object contours of the reconstructed image. However, the directions of the object contours is difficult to find when performing a coding operation at a low bit rate. Thus, the adaptive LPF cannot be applied in a very low bit rate coding.
Other block/ring effect reduction methods include repeating processes at a frequency domain and image domain under a predetermined restriction; utilizing both the previous information of an original image and the transmitted data to remove the block effect (POCS/CLS algorithm based regularization); and a constrained quadratic programming. However, these methods cannot be applied in a real-time process because they are all repetitive. Moreover, these methods process data at both the frequency domain and image domain, thereby complicating the construction of a coder and decoder.
Still other methods of reducing the block/ring effect include a method of moving the position of the 8xc3x978 blocks to be coded by an interval of one of two frames in successive images such that the block effect visually appears less; a method of controlling a filtering level using a frequency analyzer; a projection method and a smoothing operation repeating method; and a method of performing a filtering operation based upon the quantization noise information transmitted from a coder. However, these methods all have problems. Namely, most international standards prescribe that blocks have fixed positions, thus the block position should not be moved. Controlling a filtering level only changes pixel values at boundaries between adjacent blocks, resulting in a degradation in the block effect removal. The projection method require a large amount of processing time and the filtering based upon the quantization noise is inefficient because additional information must be obtained from the coder which increases the amount of bits being generated.
An object of the present invention is to solve at least the problems and disadvantages of the related art.
An object of the present invention is to reduce the block and ring effects while maintaining the details of an image. Thus, the object of the present invention is to enhance the picture quality of a reconstructed imaged obtained by decoding a coded bit stream.
Another object of the present invention is to remove the block and ring effects in a compression-coded image.
A further object of the present invention is to remove the block and ring effects in a compression-coded imaged coded at a very low bit rate.
A still further object of the present invention is to remove the block/ring effects in a compression-coded image which is transmitted by a block-by-block basis.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and advantages of the invention may be realized and attained as particularly pointed out in the appended claims.
To achieve the objects and in accordance with the purposes of the invention, as embodied and broadly described herein, a method of removing the block and ring effects in a compression-coded image transmitted by a block-by-block basis includes comparing differences between an arbitrary pixel to be filtered and the pixels surrounding the arbitrary pixel with a predetermined threshold value and selecting candidate pixels to be associated with an averaging operation among the surrounding pixels in accordance with the compared results; and selecting the surrounding pixels using any one of five 8-tab masks adaptive to a position of the arbitrary pixel. In four of the five 8-tab masks, the tabs are arranged such that the upper, lower, left and right blocks adjacent to the arbitrary block is longer, respectively. Also, one of the five 8-tab masks is a modified 3xc3x973 filtering mask such that one corner of the 3xc3x973 mask is discarded.
In another embodiment of the present invention, a method of removing the block and ring effects in a compression-coded image transmitted on a block-by-block basis, includes adaptively selecting for a given block a mask to be filtered in consideration of the directions of blocks adjacent to the given block; comparing differences between an arbitrary pixel to be filtered in the selected mask and pixels in the selected mask surrounding the arbitrary pixel with a predetermined threshold value, and selecting pixels to be associated with an averaging operation among the surrounding pixels in accordance with the compared results; and applying a desired weight to the arbitrary pixel in consideration of the number of pixels excluded in the averaging operation, and performing the averaging operation with respect to the arbitrary pixel and the selected pixels for a filtering operation with respect to the arbitrary pixel.
An image decoder according to the present invention which reconstructs an image transmitted on a block-by-block basis and filters the reconstructed image includes a filtering masking unit selecting a filtering mask including an arbitrary pixel to be filtered and pixels surrounding the arbitrary pixel, in consideration of the position of the arbitrary pixel in a given block and in consideration of the directions of blocks adjacent to the given block; candidate pixel selection unit comparing differences between the arbitrary pixel and the surrounding pixels with a predetermined threshold value and selecting candidate pixels to be associated with an averaging operation among the surrounding pixels in accordance with the compared results; and averaging unit averaging with respect to the arbitrary pixel and the candidate pixels selected by the candidate pixel selection unit to perform the filtering operation with respect to the arbitrary pixel.
The candidate pixel selection unit is adapted to exclude each of the surrounding pixels from the averaging operation if a difference between a surrounding pixel and the arbitrary pixel exceeds the predetermined threshold value. The averaging unit is adapted to apply a desired weight to the arbitrary pixel in consideration of the number of pixels excluded by the candidate pixel selection unit to perform the averaging operation with respect to both the arbitrary pixel and the candidate pixels selected by the candidate pixel selection unit.
Preferably, the threshold value is defined as xcex4=kxc3x97q, where xcex4 is the threshold value, k is a constant determined in consideration of the position of the arbitrary pixel in the given block and the directions of the blocks adjacent to the given block, and q is a quantization step interval of the given block.